package com.mallcloud.mall.app.api.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;
import java.util.Optional;

@ApiModel(value = "ProXglSendSaleGoods", description = "上传交易商品明细")
@Data
@ToString
public class ProXglSendSaleGoods implements Serializable {
	private static final long serialVersionUID = 1L;

	@ApiModelProperty("门店")
	private String storeNo;
	@ApiModelProperty("销售序号")
	private String billNo;
	@ApiModelProperty("POS终端号")
	private String posKey;

	@ApiModelProperty("过程返回id")
	private Integer messageId;
	@ApiModelProperty("过程返回信息")
	private String message;

	public boolean isSuccess() {
		return Optional.ofNullable(this.messageId).map(x -> x.equals(0)).orElse(false);
	}

	private String orderNo;
}
